package com.yuandian.management.service.impl;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yuandian.api.management.entity.ConfDataMaskConfig;
import com.yuandian.bpm.common.core.util.R;
import com.yuandian.management.mapper.ConfDataMaskConfigMapper;
import com.yuandian.management.service.ConfDataMaskConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
 * 脱敏字段配置表-Service实现
 * @author zfsn
 * @date 2023-6-7
 */
@Service
public class ConfDataMaskConfigServiceImpl extends ServiceImpl<ConfDataMaskConfigMapper, ConfDataMaskConfig>
		implements ConfDataMaskConfigService {

	@Autowired
	private ConfDataMaskConfigMapper confDataMaskConfigMapper;
	/**
	 * 分页查询
	 *
	 * @param confDataMaskConfig 分页对象
	 * @return 通用返回对象
	 */
	@Override
	public Page<ConfDataMaskConfig> listPage(ConfDataMaskConfig confDataMaskConfig) {
		return confDataMaskConfigMapper.listPage(new Page<>(confDataMaskConfig.getPageNum(), confDataMaskConfig.getPageSize()), confDataMaskConfig);
	}

	/**
	 * 通过主键更新数据
	 *
	 * @param confDataMaskConfig 实例对象
	 * @return 通用返回对象
	 */
	@Override
	public R<String> updateDataById(ConfDataMaskConfig confDataMaskConfig) {
		confDataMaskConfigMapper.updateDataById(confDataMaskConfig);
		return R.ok("修改数据成功");
	}
}